/*
 * @Author: hua
 * @Date: 2019-04-23 20:42:22
 * @description: 用户相关操作
 * @LastEditors: hua
 * @LastEditTime: 2020-07-20 17:34:36
 */
import request from '@/utils/request'

/**
 * 登录
 * @param {String} username
 * @param {String} password
 */
export function login(username, password) {
    return request({
        url: 'appUser/login',
        method: 'post',
        data: { body: { username, password } },
    });
}

/**
 * 修改密码
 * @param {Number} appUserId
 * @param {String} newPassword
 * @param {String} oldPassword
 */
export function updatePassword(appUserId, newPassword, oldPassword) {
    return request({
        url: 'appUser/updatePassword',
        method: 'post',
        data: { body: { appUserId, newPassword, oldPassword } },
    });
}
